package cn.stalk.compare.result;

import java.util.HashMap;
import java.util.Map;

public class DifferencePair<T> extends ComparisonPair<T> {

    private Map<String, DifferenceValue> values = new HashMap<>();

    public DifferencePair(Map<String, Object> keys, T source, T target) {
        super(keys, source, target);
    }

    public boolean hasDifference() {
        return !values.isEmpty();
    }

    public boolean hasDifference(String name) {
        return values.containsKey(name);
    }

    public void addDifference(String name, DifferenceValue value) {
        values.put(name, value);
    }

    public Map<String, DifferenceValue> getValues() {
        return values;
    }
}
